package cn.ycl.auth.api.user.feign;

import cn.ycl.auth.api.user.domain.User;
import cn.ycl.entity.UserInfoVO;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;

/**
 * @author yuanchangliang
 * @date 2022-06-20 15:08
 **/
@FeignClient(contextId = "remoteUserService", value = "ycl-auth",fallbackFactory = RemoteUserServiceFallback.class)
public interface RemoteUserService {
    /**
     * 获取订单
     *
     * @return 请求结果
     */
     @RequestMapping(value = "/restapi/user/getUserInfo", method = RequestMethod.GET)
     UserInfoVO getUserInfo();

    /**
     * 插入日志
     */
    @RequestMapping(value = "/user/queryByUserName/{userName}", method = RequestMethod.GET)
    User queryByUserName(@PathVariable("userName") String userName);
}
